package com.cpj.bsyyzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cpj.bsyyzx.entity.NContent;
import com.cpj.bsyyzx.entity.NurseClass;
import com.cpj.bsyyzx.mapper.NContentMapper;
import com.cpj.bsyyzx.service.INContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 五个臭皮匠
 * @since 2021-04-27
 */
@Service
public class NContentServiceImpl extends ServiceImpl<NContentMapper, NContent> implements INContentService {


    @Override
    public Page pageList(Page page, NContent  nContent) {
        if (page == null) {
            page = new Page();
        }

        QueryWrapper<NContent> wrapper = new QueryWrapper();
        if (nContent != null && !StringUtils.isEmpty((nContent.getName()))) {
            wrapper.like("name", nContent.getName());
        }
        return super.page(page, wrapper);
    }


}
